/***
	Jcommon.1.0.js
	name:xiaojia
	qq:273142650
	email:iatt@qq.com
	date:2011.10.10
***/

	(function () {
		
		window.Jcommon = function () {
			return new newJcommon();
		}
		
		var newJcommon = function () {};
		
		newJcommon.prototype = {
			
			cookiestart: function () {
				if (navigator.cookieEnabled) {
					return false;
				} else {
					return true;
				}
			}
			
		}
		
	})();
	
	//in_array
	Array.prototype.in_array = function ($string)
	{
		for (i = 0; i < this.length; i++) {
			if (this[i] == $string) {
				return true;
			}
		}
		return false;
	}
	
	String.prototype.trim = function()
	{
    	return this.replace(/(^\s*)|(\s*$)/g, '');
	}

	String.prototype.ltrim = function()
	{
    	return this.replace(/(^\s*)/g, '');
	}
	
	String.prototype.rtrim = function()
	{
    	return this.replace(/(\s*$)/g, '');
	}